#ifndef AVALON_SERVICELOCATOR_HPP
#define AVALON_SERVICELOCATOR_HPP
#include "Avalon/Base/Base.hpp"
#include "Avalon/Services/Services.hpp"

namespace Avalon {
namespace ServiceLocator {
  class Account;
  class AuthenticatedServerChannel;
  class AuthenticationException;
  class Directory;
  class DirectoryEntry;
  class MalformedUriException;
  class MySqlServiceLocatorDataStore;
  class NotLoggedInException;
  class ServiceChannelBuilder;
  class ServiceChannelFactory;
  class ServiceEntry;
  class ServiceLocatorChannel;
  class ServiceLocatorClient;
  class ServiceLocatorDataStore;
  class ServiceLocatorServlet;
  typedef Services::ServiceProtocolServletContainer<ServiceLocatorServlet,
    ServiceLocatorChannel> ServiceLocatorServer;
  class Uri;

  //! The length of a session id.
  const unsigned int SESSION_ID_LENGTH = 32;

  //! Generates a session id.
  std::string GenerateSessionId();

  //! Computes the hexadecimal SHA hash-code of a given string.
  /*!
    \param source The source string to hash.
    \return An uppercase, hexadecimal SHA hash-code of the <i>source</i>.
  */
  std::string ComputeSHA(const std::string& source);

  //! Generates an encryption key to use with a session id.
  unsigned int GenerateEncryptionKey();
}
}

#endif // AVALON_SERVICELOCATOR_HPP
